package com.packet.pojo;

import java.util.List;

// Main.java
public class Main {
    public static void main(String[] args) {
        User user = new User("Alice", 3); // 假设用户 Alice 的历史成绩为 3

        ProjectController controller = new ProjectController();

        // 使用基于历史成绩的策略推荐项目
        controller.setStrategy(new SkillLevelProjectSelectionStrategy());
        List<Project> recommendedProjects = controller.recommendProjects(user);

        System.out.println("基于历史成绩的推荐项目：");
        for (Project project : recommendedProjects) {
            System.out.println(project.getName() + ": " + project.getDescription());
        }

        // 使用基于项目复杂度的策略推荐项目
        controller.setStrategy(new ProjectComplexityStrategy());
        recommendedProjects = controller.recommendProjects(user);

        System.out.println("\n基于项目复杂性的推荐项目：");
        for (Project project : recommendedProjects) {
            System.out.println(project.getName() + ": " + project.getDescription());
        }
    }
}
